[][src]Crate heed_types

Types that can be used to serialize and deserialize types inside databases.

How to choose the right type to store things in this database? For specific types you can choose:

But if you want to store big types that can be efficiently deserialized then here is a little table to help you in your quest:

Available typesEncoding typeDecoding typeallocations
CowSlice&[T]Cow<[T]>will allocate if memory is miss-aligned
CowType&TCow<T>will allocate if memory is miss-aligned
OwnedSlice&[T]Vec<T>will always allocate
OwnedType&TTwill always allocate
UnalignedSlice&[T]&[T]will never allocate because alignement is always valid
UnalignedType&T&Twill never allocate because alignement is always valid

Re-exports

pub use self::integer::*;

Modules

integer

Byte order-aware numeric primitives.

Structs

CowSlice

Describes a slice that must be memory aligned and will be reallocated if it is not.

CowType

Describes a type that must be memory aligned and will be reallocated if it is not.

DecodeIgnore

A convenient struct made to ignore the type when decoding it.

OwnedSlice

Describes a Vec of types that are totally owned (doesn't hold any reference to the original slice).

OwnedType

Describes a type that is totally owned (doesn't hold any reference to the original slice).

SerdeBincode

Describes a type that is Serialize/Deserialize and uses bincode to do so.

SerdeJson

Describes a type that is Serialize/Deserialize and uses serde_json to do so.

Str

Describes an str.

UnalignedSlice

Describes a type that is totally borrowed and doesn't depends on any memory alignment.

UnalignedType

Describes a slice that is totally borrowed and doesn't depends on any memory alignment.

Unit

Describes the () type.

Type Definitions

ByteSlice

Describes a slice of bytes [u8] that is totally borrowed and doesn't depends on any memory alignment.